package _base0to1;

/**
 * 459. 重复的子字符串
 */
public class No459 {
    public boolean repeatedSubstringPattern(String s) {
        int n = s.length();
        label:
        for (int i = 1; i * 2 <= n; i++) {
            if (n % i == 0) {
                for (int j = i; j < n; j++) {
                    if (s.charAt(j) != s.charAt(j - i)) continue label;
                }
                return true;
            }
        }
        return false;
    }
}
